package com.dji.sample.manage.model.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * @author yjt
 * @date 2023-02-07
 * @description:
 */
@Data
public class LiveInfoDTO implements Serializable {

    private static final long serialVersionUID = -4990976900807022701L;

    private String deviceSn;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date startTime;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date endTime;

    private String playUrl;

    private Long id;

    public LiveInfoDTO(String deviceSn, Date startTime, Date endTime, String playUrl, Long id) {
        this.deviceSn = deviceSn;
        this.startTime = startTime;
        this.endTime = endTime;
        this.playUrl = playUrl;
        this.id = id;
    }
}
